<template>
  <div class="stars">
    <myheader title="我的收藏">
      <span
        slot="left"
        class="iconfont iconjiantou2"
        @click="$router.back()"
      ></span>
    </myheader>
    <articleblock
      v-for="(item, i) in startsList"
      :key="i"
      :post="item"
      @click="$router.push({ path: `/ArticleDetail/${item.id}` })"
    ></articleblock>
  </div>
</template>

<script>
import myheader from "@/components/myheader.vue";
import articleblock from "@/components/articleblock.vue";
import { userArticle } from "@/apis/user.js";
export default {
  components: {
    myheader,
    articleblock,
  },
  data() {
    return {
      startsList: [],
    };
  },
  async mounted() {
    let res = await userArticle();
    // console.log(res);
    this.startsList = res.data.data;
  },
};
</script>

<style>
</style>